from stable_baselines3.common.env_checker import check_env
from my_env import CustomEnv
env = CustomEnv(None,1)
# It will check your custom environment and output additional warnings if needed
check_env(env)